package com.qf.blogsystem.controller.website;

import com.qf.blogsystem.core.controller.BaseServlet;
import org.thymeleaf.context.WebContext;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/static/static/discuss-publish.html")
public class PublishServlet extends BaseServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //创建webContext对象
        WebContext webContext=new WebContext(request,response,this.getServletContext());
        //处理模板数据并响应
        templateEngine.process("view/site/discuss-publish",webContext,response.getWriter());
    }
}
